/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import java.io.*;

/**
 *
 * @author menderleit
 */
public abstract class FileUtils {

    public static void copy(String srcFile, String destFile) throws IOException {
        File f1 = new File(srcFile);
        File f2 = new File(destFile);
        InputStream in = new FileInputStream(f1);
        OutputStream out = new FileOutputStream(f2);

        byte[] buf = new byte[1024];
        int len;
        while ((len = in.read(buf)) > 0) {
            out.write(buf, 0, len);
        }
        in.close();
        out.close();
    }
}
